$Diff = Date.Cmp
("<date1>", "<date2>")
Returns the number of days between 2 dates.
Parameters
<date1> Any valid date expression in dd/mm/yyyy format.
<date2> Any valid date expression in dd/mm/yyyy format.
Return Value
Returns
- 0, if both the dates are equal.
- Negative integer, if the first date is greater than the second date.
- Positive integer, if the first date is lesser than the second date.
- An <Empty string> "" in case of error and sets $error.
Remarks
- Similar to DateDiff function in VB Script.
Example
$sdate = "12/07/2004"
$edate = "16/07/2004"
$ret = date.Cmp($sdate, $edate)